$OpenBSD: patch-libraries_source_spidermonkey_build_sh,v 1.3 2016/11/17 11:16:43 pascal Exp $
--- libraries/source/spidermonkey/build.sh.orig.port	Tue Oct  4 17:01:34 2016
+++ libraries/source/spidermonkey/build.sh	Thu Nov 10 14:08:44 2016
@@ -100,12 +100,12 @@ rm -rf build-release
 # the LIBRARY_NAME for each build.
 # (We use perl instead of sed so that it works with MozillaBuild on Windows,
 # which has an ancient sed.)
-perl -i.bak -pe 's/(SHARED_LIBRARY_NAME\s+=).*/$1 '\''mozjs38-ps-debug'\''/' moz.build
-mkdir -p build-debug
-cd build-debug
-CXXFLAGS="${CXXFLAGS} ${TLCXXFLAGS}" ../configure ${CONF_OPTS} --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-debug --disable-optimize --enable-js-diagnostics --enable-gczeal
-${MAKE} ${MAKE_OPTS}
-cd ..
+#perl -i.bak -pe 's/(SHARED_LIBRARY_NAME\s+=).*/$1 '\''mozjs38-ps-debug'\''/' moz.build
+#mkdir -p build-debug
+#cd build-debug
+#CXXFLAGS="${CXXFLAGS} ${TLCXXFLAGS}" ../configure ${CONF_OPTS} --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-debug --disable-optimize --enable-js-diagnostics --enable-gczeal
+#${MAKE} ${MAKE_OPTS}
+#cd ..
 
 perl -i.bak -pe 's/(SHARED_LIBRARY_NAME\s+=).*/$1 '\''mozjs38-ps-release'\''/' moz.build
 mkdir -p build-release
@@ -135,10 +135,10 @@ else
   LIB_DST_SUFFIX=.so
   if [ "`uname -s`" = "OpenBSD" ]
   then
-    DLL_SRC_SUFFIX=.so.1.0
-    DLL_DST_SUFFIX=.so.1.0
-    LIB_SRC_SUFFIX=.so.1.0
-    LIB_DST_SUFFIX=:so.1.0
+    DLL_SRC_SUFFIX=.so.$SO_VERSION
+    DLL_DST_SUFFIX=.so.$SO_VERSION
+    LIB_SRC_SUFFIX=.so.$SO_VERSION
+    LIB_DST_SUFFIX=:so.$SO_VERSION
   fi
 fi
 
@@ -158,15 +158,15 @@ fi
 # Copy files into the necessary locations for building and running the game
 
 # js-config.h is different for debug and release builds, so we need different include directories for both
-mkdir -p ${INCLUDE_DIR_DEBUG}
+#mkdir -p ${INCLUDE_DIR_DEBUG}
 mkdir -p ${INCLUDE_DIR_RELEASE}
 cp -R -L ${FOLDER}/js/src/build-release/dist/include/* ${INCLUDE_DIR_RELEASE}/
-cp -R -L ${FOLDER}/js/src/build-debug/dist/include/* ${INCLUDE_DIR_DEBUG}/
+#cp -R -L ${FOLDER}/js/src/build-debug/dist/include/* ${INCLUDE_DIR_DEBUG}/
 
 mkdir -p lib/
-cp -L ${FOLDER}/js/src/build-debug/dist/lib/${LIB_PREFIX}mozjs38-ps-debug${LIB_SRC_SUFFIX} lib/${LIB_PREFIX}mozjs38-ps-debug${LIB_DST_SUFFIX}
+#cp -L ${FOLDER}/js/src/build-debug/dist/lib/${LIB_PREFIX}mozjs38-ps-debug${LIB_SRC_SUFFIX} lib/${LIB_PREFIX}mozjs38-ps-debug${LIB_DST_SUFFIX}
 cp -L ${FOLDER}/js/src/build-release/dist/lib/${LIB_PREFIX}mozjs38-ps-release${LIB_SRC_SUFFIX} lib/${LIB_PREFIX}mozjs38-ps-release${LIB_DST_SUFFIX}
-cp -L ${FOLDER}/js/src/build-debug/dist/bin/${LIB_PREFIX}mozjs38-ps-debug${DLL_SRC_SUFFIX} ../../../binaries/system/${LIB_PREFIX}mozjs38-ps-debug${DLL_DST_SUFFIX}
+#cp -L ${FOLDER}/js/src/build-debug/dist/bin/${LIB_PREFIX}mozjs38-ps-debug${DLL_SRC_SUFFIX} ../../../binaries/system/${LIB_PREFIX}mozjs38-ps-debug${DLL_DST_SUFFIX}
 cp -L ${FOLDER}/js/src/build-release/dist/bin/${LIB_PREFIX}mozjs38-ps-release${DLL_SRC_SUFFIX} ../../../binaries/system/${LIB_PREFIX}mozjs38-ps-release${DLL_DST_SUFFIX}
 
 # On Windows, also copy debugging symbols files
